/**
 * @file userList.h
 * @brief 
 * @author xuesong (wenshaoliu@foxmail.com)
 * @version 1.0
 * @date 2024-02-27
 * 
 * @copyright Copyright (c) 2024  by xuesong
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-02-27     <td>1.0     <td>xuesong   <td>内容
 * </table>
 */
#ifndef LIST_H_
#define LIST_H_

#include <stdbool.h>
#include "stdint.h"

#define LSIZE 45

struct film{
    uint16_t alarmMin;
    uint8_t  flag;
};

typedef struct film Item;

struct CountDown{
    uint8_t  index;
    uint16_t downSecond;
    uint8_t  flag;
};
typedef struct CountDown CountDown_t;

typedef struct node{
    Item item;
    struct node * next;
}Node;

typedef Node * List;
/**
 * @brief  init list
 * @param  plist            MyParamDoc
 */
void initList(List * plist);
/**
 * @brief 
 * @param  plist            MyParamDoc
 * @return true 
 * @return false 
 */
bool listIsEmpty(List * plist);
bool listIsFull(List * plist);
bool addItem(List * plist, Item item);
bool InsertItem(List * plist, Item item);
void ListDelItem(List * plist, Item item);
void ListDelAll(List * plist);
void traverse(List * plist, void (*func)(Item item, int index));
unsigned int itemCount(List * plist);
void emptyList(List * plist);
Item * getItem(List * plist, int index);
#endif